package cn.itsource.basic.mapper;

import cn.itsource.basic.query.BaseQuery;

import java.util.List;

public interface BaseMapper<T> {

    //查询所有
    List<T> findAll();

    //添加
    void save(T t);
    //删除
    void remove(Long id);
    //修改
    void update(T t);

    //分页和高级查询
    //查询总条数
    Long queryCount(BaseQuery query);
    //分页的数据
    List<T> queryPage(BaseQuery query);

    void removes(List<Long> ids);

    T findOne(Long id);
}
